<template>
	<view class="bg">
		<xl-navbar title="CountTo数字滚动" fixed shadow></xl-navbar>
		<view class="content">
			<view class="title">基础样式：未开始，则开始倒计时</view>
			<xl-count-down startTime="2025-01-04T00:00:00" endTime="2025-01-06T00:00:00"></xl-count-down>
			<view class="title">基础样式：进行中，则结束倒计时</view>
			<xl-count-down startTime="2025-01-01T00:00:00" endTime="2025-01-06T00:00:00"></xl-count-down>
			<view class="title">基础样式：已结束</view>
			<xl-count-down startTime="2025-01-01T00:00:00" endTime="2025-01-02T00:00:00"></xl-count-down>
			<view class="title">格式化时间</view>
			<xl-count-down startTime="2025-01-01T00:00:00" endTime="2025-01-03T00:00:00" format="HH时mm分ss秒"></xl-count-down>
			<view class="title">计算毫秒：格式化加上SSS</view>
			<xl-count-down startTime="2025-01-01T00:00:00" endTime="2025-01-05T00:00:00" format="HH:mm:ss:SSS"></xl-count-down>
			<view class="title">计算天数：格式化加上dd</view>
			<xl-count-down startTime="2025-01-01T00:00:00" endTime="2025-01-05T00:00:00" format="dd:HH:mm:ss"></xl-count-down>
			<view class="title">卡片样式</view>
			<xl-count-down timeType="cart" startTime="2025-01-01T00:00:00" endTime="2025-01-05T00:00:00" color="#0a93ff" timeSize="22" format="dd天HH时mm分ss秒"></xl-count-down>
		</view>
	</view>
</template>

<script setup>
	import { ref, onMounted, computed } from "vue";
	
	console.log(uni.$xl.moment().endOf('2025-01-03 00:00:00').fromNow());
</script>
